package com.ads.tpgrupo4.server.xml;

import org.w3c.dom.Document;

import com.ads.tpgrupo4.server.utils.XmlUtils;

public class FIlePathXmlSource implements XmlSource {

	private String filePath;

	public FIlePathXmlSource(final String filePath) {
		
		this.filePath = filePath;
	}
	
	@Override
	public Document getDocument() throws XmlSourceProcessingException {

		try {
			return XmlUtils.getDocumentFromFilePath(this.filePath);
		} catch (final Exception e) {
			throw new XmlSourceProcessingException(e);
		}
	}

}
